<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
var arr = [10, 20, 100, 200, 150, 40, 70, 80];
console.log("原来数组:", arr);
var arr1 = arr.slice(0, 3)
console.log(arr1);
console.log(arr.slice(1, 7));
console.log(arr.slice());  // 复制一个数组最简单的办法
console.log(arr.slice(3));
arr.slice(0, parseInt(arr.length/2))
arr.slice(parseInt(arr.length / 2))
</script>
</body>
</html>